<template>
  <div class="w-150 m-auto" style="padding-top: 100px;">
    <Result status="success" title="按客户设置价格成功" sub-title="可前往价格维护中(生效)查看" v-if="flag">
      <template #extra>
        <a-button type="primary" @click="emit('redo')"> 再次新增 </a-button>
        <a-button @click="handleJump()" > 前往查看 </a-button>
      </template>
    </Result>
    <!-- <Result status="error" title="操作失败" sub-title="提交失败" v-else>
      <template #extra>
        <a-button type="primary" @click="customResetFunc()"> 上一步 </a-button>
      </template>
    </Result> -->
  </div>
</template>
<script lang="ts" setup>
  import { defineComponent, ref,defineProps ,onMounted  } from 'vue';
  import { Result, Descriptions } from 'ant-design-vue';
  import { router } from '/@/router';

  const emit = defineEmits(['redo','prev']);

  const props = defineProps({
      data: Object,
  });

  let flag = ref(true)

  async function customResetFunc() {
    emit('prev');
  }

  function handleJump() {
    router.push({
      path: '/setting/price/wecharCusInvPriceRouteValid/list',
      query: {
        cusCode: props.data.list[0].code,
      },
    });
  }
</script>
